package es.andresimon.portfolio.security;

import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;
import org.springframework.roo.addon.entity.RooEntity;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import es.andresimon.portfolio.security.UserRole;
import javax.persistence.Enumerated;

@RooJavaBean
@RooToString
@RooEntity(finders = { "findPortfolioUsersByLoginEquals" })
public class PortfolioUser {

    @NotNull
    @Size(min = 1, max = 100)
    private String name;

    @NotNull
    @Size(min = 1, max = 10)
    private String login;

    @NotNull
    @Size(min = 1, max = 10)
    private String password;

    @NotNull
    @Size(min = 1, max = 100)
    private String email;

    @Enumerated
    private UserRole userRole;
}
